Skip to content

Conversation

ankitm3k
Copy link

@ankitm3k ankitm3k commented Oct 10, 2025

Description

This PR enables the ETW Traces Logging for OVEP for Windows OS. Currently, this PR enables logging all the Session & Provider Options supported by OVEP during runtime. Usage is governed by using below data inside ort_traces.wprp file -
Provider Name: Intel.ML.ONNXRuntime.OpenVINO
Provider GUID: b5a8c2e1-4d7f-4a3b-9c2e-1f8e5a6b7c9d

The ovep_traces.wprp file MUST include below config to enable ETW tracing for OVEP explicitly -

    <!-- OpenVINO EP provider -->
    <EventProvider Id="EventProvider_OpenVINOExecutionProvider"
      Name="b5a8c2e1-4d7f-4a3b-9c2e-1f8e5a6b7c9d" Level="5" />

.... existing configuration ....

<Collectors>
        <EventCollectorId Value="EventCollector_OrtTraceLoggingProvider">
          <EventProviders>
            <EventProviderId Value="EventProvider_OrtTraceLoggingProvider" />
            <EventProviderId Value="EventProvider_OpenVINOExecutionProvider" />
          </EventProviders>
        </EventCollectorId>
      </Collectors>

Sample Commands to get the ETW traces using onnxruntime_perf_test.exe app -

wpr -start ovep_traces.wprp

onnxruntime_perf_test.exe -e openvino -m times -r 10 -o 0 -I -i "device_type|NPU" "C:\Users\Windows\Downloads\model.onnx"

wpr -stop ort_ovep_trace.etl -compress

This PR fulfills below request - https://jira.devtools.intel.com/browse/CVS-174008

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables ETW (Event Tracing for Windows) logging for the OpenVINO Execution Provider (OVEP) to support runtime tracing of session and provider options. The implementation adds comprehensive logging capabilities that can be consumed through Windows Performance Recorder (WPR) tools for debugging and monitoring OVEP behavior.

  • Introduces a new telemetry system with ETW provider registration and structured JSON logging
  • Adds configuration to Windows Performance Recording Profile for OVEP tracing
  • Integrates telemetry logging into the OpenVINO execution provider lifecycle

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ort.wprp Adds OpenVINO EP event provider configuration to Windows Performance Recording Profile
ov_telemetry.h Defines telemetry interface and ETW provider declarations for OpenVINO EP
ov_telemetry.cc Implements ETW tracing functionality with JSON serialization for provider/session options
openvino_execution_provider.h Adds telemetry includes and session tracking members
openvino_execution_provider.cc Integrates telemetry logging into provider constructor

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ankitm3k ankitm3k force-pushed the ankit/enable_etw_logging branch from 5a9c706 to acfa7b2 Compare October 13, 2025 07:36
@ankitm3k ankitm3k requested a review from Copilot October 13, 2025 08:05
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ankitm3k ankitm3k requested a review from Copilot October 13, 2025 09:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ankitm3k ankitm3k requested a review from Copilot October 13, 2025 11:35
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ankitm3k ankitm3k force-pushed the ankit/enable_etw_logging branch from bb77a96 to 8d54276 Compare October 13, 2025 11:43
@sfatimar
Copy link

Has the conversation happened to put this information in RelWithDebInfo/Debug Builds. I think Telemetry Keyword should be removed, else the feature may be flagged for AI Privacy evaluation in SDL Review , Please use Tracing/Logging is much better

@ankitm3k
Copy link
Author

Has the conversation happened to put this information in RelWithDebInfo/Debug Builds. I think Telemetry Keyword should be removed, else the feature may be flagged for AI Privacy evaluation in SDL Review , Please use Tracing/Logging is much better

In my opinion this feature must be available for all build type, we must not restrict this functionality for any specific debug only build type. We can discuss about it in the internal forums.

Telemetry name is used because QNN & MSFT also uses the same terminology which is MSFT approved. Thus I will retain the same name. Refer this PR: microsoft#19397

@MayureshV1
Copy link

Has the conversation happened to put this information in RelWithDebInfo/Debug Builds.

@sfatimar , We need this ability to enable debugging capabilities for the options specified by a deployed app in Release so would not want to restrict its usage.

@jnagi-intel
Copy link

For ETW logging to work with our tools (GpuView), you need to implement manifest based logging. Tracelogging will not work.

@ankitm3k ankitm3k force-pushed the ankit/enable_etw_logging branch from 5c6bca3 to a1dda48 Compare October 15, 2025 05:47
Copy link

@sfatimar sfatimar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run coverity before merge.

@MayureshV1 MayureshV1 changed the title feat: Enable ETW Tracing for OVEP CVS-174008: Enable ETW Tracing for OVEP Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants